package com.yzmoney.wechat.model.send;

import java.util.HashMap;
import java.util.Map;

/*
{
    "touser":"OPENID",
    "template_id":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
    "url":"http://weixin.qq.com/download",
    "topcolor":"#FF0000",
    "data":{
            "first": {
                "value":"您好，您已成功消费。",
                "color":"#0A0A0A"
            },
            "keynote1":{
                "value":"巧克力",
                "color":"#CCCCCC"
            },
            "keynote2": {
                "value":"39.8元",
                "color":"#CCCCCC"
            },
            "keynote3":{
                "value":"2014年9月16日",
                "color":"#CCCCCC"
            },
            "remark":{
                "value":"欢迎再次购买。",
                "color":"#173177"
            }
    }
}
*/
public class TemplateMsg {
	private String touser; //":"OPENID",
	private String template_id; //":"ngqIpbwh8bUfcSsECmogfXcV14J0tQlEpBO27izEYtY",
	private String url;  //":"http://weixin.qq.com/download",
	private String topcolor; //":"#FF0000",
	private Data data;
	
	public TemplateMsg() {
		super();
		data = new Data();
	}

	public TemplateMsg(String touser, String template_id, String url,
			String topcolor, Data data) {
		super();
		this.touser = touser;
		this.template_id = template_id;
		this.url = url;
		this.topcolor = topcolor;
		this.data = data;
	}

	public String getTouser() {
		return touser;
	}

	public void setTouser(String touser) {
		this.touser = touser;
	}
	
	public String getTemplate_id() {
		return template_id;
	}

	public void setTemplate_id(String template_id) {
		this.template_id = template_id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTopcolor() {
		return topcolor;
	}

	public void setTopcolor(String topcolor) {
		this.topcolor = topcolor;
	}

	public Data getData() {
		return data;
	}

	public void setData(Data data) {
		this.data = data;
	}
	
	public void setDataFirstValue(String value){
		this.data.getFirst().put("value", value);
	};
	
	public void setDataFirstColor(String color){
		this.data.getFirst().put("color", color);
	};
	
	public void setDataKeynote1Value(String value){
		this.data.getKeyword1().put("value", value);
	}
	
	public void setDataKeynote1Color(String color){
		this.data.getKeyword1().put("color", color);
	}
	
	public void setDataKeynote2Value(String value){
		this.data.getKeyword2().put("value", value);
	}
	
	public void setDataKeynote2Color(String color){
		this.data.getKeyword2().put("color", color);
	}
	
	public void setDataKeynote3Value(String value){
		this.data.getKeyword3().put("value", value);
	}
	
	public void setDataKeynote3Color(String color){
		this.data.getKeyword3().put("color", color);
	}
	
	public void setDataKeynote4Value(String value){
		this.data.getKeyword4().put("value", value);
	}
	
	public void setDataKeynote4Color(String color){
		this.data.getKeyword4().put("color", color);
	}
	
	public void setDataKeynote5Value(String value){
		this.data.getKeyword5().put("value", value);
	}
	
	public void setDataKeynote5Color(String color){
		this.data.getKeyword5().put("color", color);
	}
	
	public void setDataRemarkValue(String value){
		this.data.getRemark().put("value", value);
	}

	public void setDataRemarkColor(String color){
		this.data.getRemark().put("color", color);
	}
	
	class Data{
		private Map<String, String> first;
		private Map<String, String> keyword1;
		private Map<String, String> keyword2;
		private Map<String, String> keyword3;
		private Map<String, String> keyword4;
		private Map<String, String> keyword5;
		private Map<String, String> remark;
		
		public Data() {
			super();
			first = new HashMap<String, String>();
			keyword1 = new HashMap<String, String>();
			keyword2 = new HashMap<String, String>();
			keyword3 = new HashMap<String, String>();
			keyword4 = new HashMap<String, String>();
			keyword5 = new HashMap<String, String>();
			remark = new HashMap<String, String>();
		}
		
		
		public Data(Map<String, String> first, Map<String, String> keynote1,
				Map<String, String> keynote2, Map<String, String> keynote3,
				Map<String, String> keynote4, Map<String, String> keynote5,
				Map<String, String> remark) {
			super();
			this.first = first;
			this.keyword1 = keynote1;
			this.keyword2 = keynote2;
			this.keyword3 = keynote3;
			this.keyword4 = keynote4;
			this.keyword5 = keynote5;
			this.remark = remark;
		}


		public Map<String, String> getFirst() {
			return first;
		}
		public void setFirst(Map<String, String> first) {
			this.first = first;
		}
		
		
		
		public Map<String, String> getKeyword1() {
			return keyword1;
		}


		public void setKeyword1(Map<String, String> keyword1) {
			this.keyword1 = keyword1;
		}


		public Map<String, String> getKeyword2() {
			return keyword2;
		}


		public void setKeyword2(Map<String, String> keyword2) {
			this.keyword2 = keyword2;
		}


		public Map<String, String> getKeyword3() {
			return keyword3;
		}


		public void setKeyword3(Map<String, String> keyword3) {
			this.keyword3 = keyword3;
		}


		public Map<String, String> getKeyword4() {
			return keyword4;
		}


		public void setKeyword4(Map<String, String> keyword4) {
			this.keyword4 = keyword4;
		}


		public Map<String, String> getKeyword5() {
			return keyword5;
		}


		public void setKeyword5(Map<String, String> keyword5) {
			this.keyword5 = keyword5;
		}


		public Map<String, String> getRemark() {
			return remark;
		}
		public void setRemark(Map<String, String> remark) {
			this.remark = remark;
		}
	
		
	}
}
